#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif defined(_MSC_VER)
#pragma warning(disable : 4996)
#endif

#include<iostream>
#include<json/json.h>



int main()
{
    Json::Value root;
    root["x"] = 100;
    root["y"] = 200;
    root["op"] = '+';
    root["desc"] = "this is a + ope";

    //Json::StyledWriter w;
    Json::FastWriter w;
    std::string ret = w.write(root);

    std::cout << ret << std::endl;

    Json::Value v;
    Json::Reader r;
    r.parse(ret,v);
    int x = v["x"].asInt();
    int y = v["y"].asInt();
    char op = v["op"].asInt();
    std::string desc = v["desc"].asString();

    std::cout << x << std::endl;
    std::cout << op << std::endl;
    std::cout << y << std::endl;
    std::cout << desc << std::endl;



    return 0;
}